package com.jie.myvhr.service;

import com.jie.myvhr.bean.Nation;
import com.jie.myvhr.bean.PoliticsStatus;
import com.jie.myvhr.mapper.EmpMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @author jie
 * @date 2019/6/30 -15:53
 */
@Service
@Transactional
public class EmpService {
    SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy");
    SimpleDateFormat monthFormat = new SimpleDateFormat("MM");
    SimpleDateFormat birthdayFormat = new SimpleDateFormat("yyyy-MM-dd");
    DecimalFormat decimalFormat = new DecimalFormat("##.00");

    @Resource
    private EmpMapper empMapper;

    public List<Nation> getAllNations() {
        return empMapper.getAllNations();
    }
    public List<PoliticsStatus> getAllPolitics() {
        return empMapper.getAllPolitics();
    }
    public Long getMaxWorkID() {
        Long maxWorkID = empMapper.getMaxWorkID();
        return maxWorkID == null ? 0 : maxWorkID;
    }
}
